import request from "/@/utils/request"

export function fetchList(query?: Object) {
    return request({
        url: '/eletile-digital/basDicSet/page',
        method: 'get',
        params: query
    })
}

export function addObj(obj?: Object) {
    return request({
        url: '/eletile-digital/basDicSet',
        method: 'post',
        data: obj
    })
}

export function listDicItemById(id?: Object) {
    return request({
        url: `/eletile-digital/basDicSet/${id}/dic_item`,
        method: 'get'
    })
}

export function getObj(id?: string) {
    return request({
        url: '/eletile-digital/basDicSet/' + id,
        method: 'get'
    })
}

export function getByCode(code?: string) {
    return request({
        url: '/eletile-digital/basDicSet/code/' + code,
        method: 'get'
    })
}

export function delObjs(ids?: Object) {
    return request({
        url: '/eletile-digital/basDicSet',
        method: 'delete',
        data: ids
    })
}

export function putObj(obj?: Object) {
    return request({
        url: '/eletile-digital/basDicSet',
        method: 'put',
        data: obj
    })
}

export function delChildObj(ids?: Object) {
    return request({
        url: '/eletile-digital/basDicSet/child',
        method: 'delete',
        data: ids
    })
}
